<style>
    table th, table td{
        text-align: center !important;
    }
    .page-content .portlet .portlet-search-body .search-item{
        width: 15%;
    }
</style>

<div class="portlet">
    <div class="portlet-actions">
        <button class="btn blue btn-sm" ng-click="grid.add()"><i class="fa fa-plus"></i> 新增</button>
    </div>
    <form class="portlet-search-body" name="queryForm">
        <input type="text" class="form-control search-item" ng-model="supplierName" placeholder="供应商名称">
        <div class="search-item">
            <button class="btn btn-icon-only default"><i class="fa fa-chevron-right"></i></button>
            <button class="btn btn-sm query" ng-click="query();"><i class="fa fa-search"></i> 查询</button>
            <button class="btn btn-sm reset" ng-click="reset();"><i class="fa fa-eraser"></i> 重置</button>
        </div>
    </form>
    <div class="portlet-body">
        <table ed-grid="grid"  class="table table-striped table-bordered table-advance table-hover"
               data-options="url: 'stockSupplier/query.do', modelText: 'xx列表', form: 'queryForm', modal: 'modal'">
            <thead>
            <tr>
                <th data-options="field: '_index'"></th>
                <th data-options="field: 'supplierName'">供应商名称</th>
                <th data-options="field: 'contactName'">联系人</th>
                <th data-options="field: 'contactPhone'">联系电话</th>
                <th data-options="field: 'address'">地址</th>
                <!--<th data-options="field: 'status | code : supplierstatus'">状态</th>-->
                <th data-options="field: 'remark'">备注</th>
                <th>操作</th>
            </tr>
            </thead>
        </table>
    </div>
</div>

<div ed-modal="modal" data-options="title: 'xxxx', static: true, width: 720, defaultButton:false,onHidden:'reset'">
    <form action="#" class="form-horizontal w5c-form" w5c-form-validate novalidate name="validateForm">
        <div class="form-body">
        	<div class="form-group">
				<label class="col-md-2 control-label">供应商名称</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="supplierName" ng-model="stockSupplier.supplierName" required>
            	</div>
				<label class="col-md-2 control-label">联系人</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="contactName" ng-model="stockSupplier.contactName" required>
            	</div>
            </div>
        	<div class="form-group">
				<label class="col-md-2 control-label">联系电话</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="contactPhone" ng-model="stockSupplier.contactPhone" required>
            	</div>
				<label class="col-md-2 control-label">地址</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="address" ng-model="stockSupplier.address" required>
            	</div>
            </div>
        	<div class="form-group">
				<!--<label class="col-md-2 control-label">状态</label>
				<div class="col-md-4">
					<select class="form-control" name="status" ng-model="stockSupplier.status"
							ng-options="opt.value as opt.name for opt in options.supplierstatus" required>
						<option value="" disabled selected hidden>&#45;&#45; 状态 &#45;&#45;</option>
					</select>
            	</div>-->
				<label class="col-md-2 control-label">备注</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="remark" ng-model="stockSupplier.remark" required>
            	</div>
            </div>
        </div>
        <div class="form-actions">
            <button type="button" class="btn default" ng-click="grid.cancel();">
                <i class="fa fa-times"></i> 取消
            </button>
            <button type="button" class="btn blue" w5c-form-submit="grid.save();">
                <i class="fa fa-check"></i> 确定
            </button>
        </div>
    </form>
</div>
